package tech.aistar.util;

import tech.aistar.entity.UserDTO;

/**
 * 本类用来演示:
 *
 * @author jyz
 * @date 2023/3/11 20:11:56
 */

public class UserDTOThreadLocal {
    private static final ThreadLocal<UserDTO> local = new ThreadLocal<>();
    public static void save(UserDTO userDTO){
        local.set(userDTO);
    }
    public static void remove(){
        local.remove();
    }
    public static UserDTO getInfo(){
        return local.get();
    }
}
